package com.atguigu.easyexcel.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.format.NumberFormat;
import lombok.Data;

import java.util.Date;

/**
 * @author dyqstart
 * @create 2021-07-07-11:39
 * @since 1.0.0
 */
@Data
public class ExcelStudentData {
    @ExcelProperty(value = "姓名",index = 0)
    private String name;

    @DateTimeFormat("yyyy年MM月dd日")
    @ExcelProperty(value = "生日",index = 1)
    private Date birthday;

    @NumberFormat("#,##")//保留两位小数
    @ExcelProperty(value = "薪资",index = 3)
    private Double salary;

    /**
     * 忽略这个字段
     */
    @ExcelIgnore
    private String password;
}
